<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Expires-Type" content="0"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" CONTENT="no-cache"/>
    <title>账户安全</title>
    <link type="text/css" rel="stylesheet"
          href="//misc.360buyimg.com/jdf/1.0.0/unit/??ui-base/5.0.0/ui-base.css,shortcut/5.0.0/shortcut.css,global-header/1.0.0/global-header.css,myjd/5.0.0/myjd.css,nav/2.0.0/nav.css,shoppingcart/2.0.0/shoppingcart.css,global-footer/5.0.0/global-footer.css,service/5.0.0/service.css,basePatch/1.0.0/basePatch.css"/>
    <script type="text/javascript"
            src="//misc.360buyimg.com/jdf/1.0.0/unit/??base/5.0.0/base.js,basePatch/1.0.0/basePatch.js"></script>
    <link rel="stylesheet" type="text/css" href="//misc.360buyimg.com/user/myjd-2015/css/myjd.info.css" media="all">
    <link type="text/css" rel="stylesheet" href="//misc.360buyimg.com/user/myjd-2015/widget/??common/common.css"
          source="widget"/>
    <script type="text/javascript"
            src="//misc.360buyimg.com/jdf/??lib/jquery-1.6.4.js,1.0.0/unit/libPath/1.0.0/libPath.js"></script>

</head>

<!--set|info-->
<body myjd="_MYJD_info" menuId="set">
<!--shortcut start-->
<div id="shortcut-2014">
    <div class="w">
        <ul class="fl">
            <li id="ttbar-home"><i class="iconfont">&#xe608;</i><a href="http://meimeistore.com/" target="_blank">商城首页</a>
            </li>
            <li class="dorpdown" id="ttbar-mycity"></li>
        </ul>
        <ul class="fr">
            <li class="fore1" id="ttbar-login">
                <a class="link-login">你好 [[${session.loginUser==null?'':session.loginUser.username}]]</a>&nbsp;&nbsp;
            </li>
            <li class="spacer"></li>
            <li class="fore2">
                <div class="dt">
                    <a target="_blank" href="http://order.meimeistore.com/orderlist.html">我的订单</a>
                </div>
            </li>
            <li class="spacer"></li>
            <li class="fore3 dorpdown" id="ttbar-myjd">
                <div class="dt cw-icon">
                    <!-- <i class="ci-right"><s>◇</s></i> -->
                    <a target="_blank" href="//home.jd.com/">我与商城</a>
                </div>
            </li>
            <li class="spacer"></li>
            <li class="fore4" id="ttbar-member">
                <div class="dt">
                    <a target="_blank" href="//vip.jd.com/">会员服务</a>
                </div>
            </li>
        </ul>
        <span class="clr"></span>
    </div>
</div>
<div id="o-header-2013">
    <div id="header-2013" style="display:none;"></div>
</div>
<!--shortcut end-->

<div id="nav">
    <div class="w">
        <div class="logo">
            <a href="http://meimeistore.com" target="_blank" class="fore1"
               clstag="homepage|keycount|home2013|Homejdlogo"></a>
            <a href="" target="_self" class="fore2" clstag="homepage|keycount|home2013|Homebackm">我与商城</a>
            <a href="http://meimeistore.com" target="_blank" class="fore3" clstag="homepage|keycount|home2013|Homebackjd">返回商城首页</a>
        </div>
        <div class="navitems">
            <ul>
                <li class="fore-1">
                    <a target="_self" href="" clstag="homepage|keycount|home2013|Homeindex">首页</a>
                </li>
                <li class="fore-3">
                    <div class="dl" clstag="click|keycount|myhome|hsz">
                        <div class="dt">
                            <span class="myjd-set">账户设置</span>
                            <b></b>
                        </div>
                        <div class="dd">

                            <a tid="_MYJD_info" clstag="Homeyser" href="http://member.meimeistore.com/web/info.html"
                               target="_self"><span>个人信息</span></a>
                            <a tid="_MYJD_safe" clstag="Homesafe" href="http://member.meimeistore.com/web/secret.html"
                               target="_self"><span>账户安全</span></a>
                            <a tid="_MYJD_accbinde" clstag="Homezhbd" href="//safe.jd.com/union/index.action"
                               target="_self"><span>账号绑定</span></a>
                            <a tid="_MYJD_comments" clstag="homeadd"
                               href="http://member.meimeistore.com/web/address.html"
                               target="_self"><span>收货地址</span></a>
                            <a tid="_MYJD_pay" clstag="Homequick"
                               href="https://authpay.jd.com/card/queryBindCard.action"
                               target="_blank"><span>我的银行卡</span></a>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="nav-r">
            <div id="settleup-2014" class="dorpdown">
                <div class="cw-icon">
                    <i class="ci-left"></i>
                    <i class="ci-right">></i>
                    <a target="_blank" href="//cart.jd.com/cart.action">我的购物车</a>
                </div>
                <div class="dorpdown-layer">
                    <div class="spacer"></div>
                    <div id="settleup-content">
                        <span class="loading"></span>
                    </div>
                </div>
            </div>
            <div id="hotwords-2014"></div>
        </div>
        <div class="clr"></div>
    </div>
</div>

<!--container start-->

<div id="container">
    <div class="w">
        <div id="content">
            <div id="sub">
                <div id="menu">
                    <dl class="fore1">
                        <dt id="_MYJD_setting">设置</dt>
                        <dd class="fore1_1" id="_MYJD_info">
                            <a clstag="homepage|keycount|home2013|Homeyser"
                               href="http://member.meimeistore.com/web/info.html" target="_self"
                               style="color: #777; font-weight: 400;">个人信息</a>
                        </dd>
                        <dd class="fore1_2" id="_MYJD_safe">
                            <a clstag="homepage|keycount|home2013|Homesafe"
                               href="http://member.meimeistore.com/web/secret.html"
                               target="_self" style="color: #e4393c; font-weight: 700;">账户安全</a>
                        </dd>
                        <dd class="fore1_3" id="_MYJD_accbinde">
                            <a clstag="homepage|keycount|home2013|Homezhbd" href="//safe.jd.com/union/index.action"
                               target="_self">账号绑定</a>
                        </dd>
                        <dd class="fore1_5" id="_MYJD_comments">
                            <a clstag="homepage|keycount|home2013|homeadd"
                               href="http://member.meimeistore.com/web/address.html" target="_self">收货地址</a>
                        </dd>
                        <dd class="fore1_11" id="_MYJD_pay">
                            <a clstag="homepage|keycount|home2013|Homequick"
                               href="https://authpay.jd.com/card/queryBindCard.action" target="_blank">我的银行卡</a>
                        </dd>
                    </dl>
                </div>
            </div>

            <div id="main">
                <div class="mod-main">
                    <div class="mc">
                        <div class="user-set userset-lcol">
                            <div class="form">
                                <input type="hidden" id="id_Input" th:value="${memberId}">
                                <div class="item">
                                    <span class="label" style="width: 120px;"><em>*</em>输入旧密码：</span>
                                    <div class="fl">
                                        <input clstag="homepage|keycount|home2013|infoname" type="text" class="itxt"
                                               minlength="6" id="old_password_input">
                                        <div class="clr"></div>
                                        <div class="prompt-06"><span id="old_password_msg"></span></div>
                                    </div>
                                </div>
                                <div class="item">
                                    <span class="label" style="width: 120px;"><em>*</em>输入新密码：</span>
                                    <div class="fl">
                                        <input clstag="homepage|keycount|home2013|infoname" type="text" class="itxt"
                                               minlength="6" id="new_password_input">
                                        <div class="clr"></div>
                                        <div class="prompt-06"><span id="new_password_msg"></span></div>
                                    </div>
                                </div>
                                <div class="item">
                                    <span class="label" style="width: 120px;"><em>*</em>输入绑定手机号：</span>
                                    <div class="fl">
                                        <input clstag="homepage|keycount|home2013|infoname" type="text" class="itxt"
                                               minlength="11" id="phone_input">
                                        <div class="clr"></div>
                                        <div class="prompt-06"><span id="phone_msg"></span></div>
                                    </div>
                                </div>
                                <div class="item">
                                    <span class="label" style="width: 120px;"><em>*</em>输入短信验证码：</span>
                                    <a id="sendCode" style="margin-left: 10px">点击发送验证码 </a>
                                    <div class="fl">
                                        <input clstag="homepage|keycount|home2013|infoname" type="text" class="itxt"
                                               minlength="6" id="check_code_input">
                                        <div class="clr"></div>
                                        <div class="prompt-06"><span id="check_code_msg"></span></div>
                                    </div>
                                </div>
                                <div class="item">
                                    <span class="label">&nbsp;</span>
                                    <div class="fl">
                                        <a clstag="homepage|keycount|home2013|infobtn" href="javascript:void(0)"
                                           class="btn-5" onclick="function updateUserSecret() {
                                                var old_password = document.getElementById('old_password_input').value;
                                                var new_password = document.getElementById('new_password_input').value;
                                                var check_code = document.getElementById('check_code_input').value;
                                                var id = document.getElementById('id_Input').value;
                                                var phoneNum = document.getElementById('phone_input').value;
                                                if(old_password === '' || new_password === ''){
                                                    alert('请先输入原始密码和新密码');
                                                    return;
                                                }
                                                if(check_code === ''){
                                                    alert('请输入验证码');
                                                    return;
                                                }
                                                $.ajax({
                                                    url: 'http://member.meimeistore.com//web/checkUpdateSecretCode',
                                                    data: {'phoneNum':phoneNum, 'check_code': check_code},
                                                    async: false,
                                                    xhrFields: {
                                                        withCredentials: true
                                                    },
                                                    crossDomain: true,
                                                    success: function (data) {
                                                        if(data.code !== 0){
                                                            alert(data.msg);
                                                            return;
                                                        }else{
                                                            $.ajax({
                                                                url: 'http://member.meimeistore.com//web/updateSecret',
                                                                data: {'id':id, 'old_password':old_password, 'new_password':new_password},
                                                                async: false,
                                                                xhrFields: {
                                                                    withCredentials: true
                                                                },
                                                                crossDomain: true,
                                                                success: function (data) {
                                                                    if(data.code === 0 || data.code === 2){
                                                                        alert(data.msg);
                                                                        location.href='http://auth.meimeistore.com/loginout';
                                                                    }else if(data.code === 1){
                                                                        alert(data.msg);
                                                                        return;
                                                                    }
                                                                }
                                                            });
                                                        }
                                                    }
                                                });
                                           }
                                           updateUserSecret()">提交</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clr"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--container end-->

<span>该页面前端代码扒取自京东</span>
<br>
<span>商城后台管理系统网址:</span>
<br>
<span>全项目代码仓库:</span>
<br>
<span>kubesphere控制台网址:</span>
<br>
<span>矫健 18765969918</span>


<script type="text/javascript">
    (function () {
        var ja = document.createElement('script');
        ja.type = 'text/javascript';
        ja.async = true;
        ja.src = document.location.protocol + '//wl.jd.com/wl.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ja, s);
    })();
</script>


<script type="text/javascript" src="//misc.360buyimg.com/user/myjd-2015/widget/??common/common.js"
        source="widget"></script>
<script type="text/javascript">
    if (1 == 1) {
        $("#aliasArea").show();
    } else {
        $("#aliasArea").hide();
    }

    //生日初始化
    var originalBirthday = ''.split("-");
    var originalBirthdayYear = originalBirthday[0];  // 原年份
    var originalBirthdayMonth = parseInt(originalBirthday[1], 10);// 原月份
    var originalBirthdayDay = parseInt(originalBirthday[2], 10);// 原日期

    //地区初始化
    var originalProvince = '';//省ID
    if (originalProvince == 0) {
        originalProvince = 1;
    }
    var originalCity = '';//市ID
    if (originalCity == 0) {
        originalCity = 72;
    }
    var originalCounty = '';//县区ID
    if (originalCounty == 0) {
        originalCounty = 2799;
    }


    $(".hobul").children().click(
        function () {
            if ($(this).attr("class") == "" || $(this).attr("class") == "i-li" || $(this).attr("class") == undefined) {
                $(this).removeClass("i-li");
                $(this).addClass("selected i-li");
            } else {
                $(this).removeClass("selected i-li");
                $(this).addClass("i-li");
            }
        }
    )
    var hobbyType = '';//兴趣爱好
    if (hobbyType != null || hobbyType != "") {
        var arr = hobbyType.split(",");
        for (var i = 0; i < arr.length; i++) {
            $(".hobul").children().each(function () {
                if ($(this).val() == arr[i]) {
                    $(this).removeClass("i-li");
                    $(this).addClass("selected i-li");
                }
            });
        }
    }

    // 为发送验证码的a标签绑定单击事件
    $(function () {
        $("#sendCode").click(function () {
            // // 先判断是否输入手机号
            if(document.getElementById('phone_input').value.length != 11){
                alert('请先输入手机号');
                return;
            }
            // 1 进入倒计时
            // 先判断是否已经在倒计时了
            if ($(this).hasClass("disable")) {

            } else {
                // 2 给指定手机号发送验证码并开始倒计时
                // 用function执行回调函数，data就是后端返回的数据
                $.get("/web/sendcodepassword?phoneNum=" + $("#phone_input").val(), function (data) {
                    if (data.code != 0) {
                        alert(data.msg);
                    } else {
                        timeoutChangeStyle();
                    }
                });
            }
        })
    })

    // 计时器的值
    var num = 60;

    // 专门抽取的用于根据倒计时修改a标签值的方法
    function timeoutChangeStyle() {
        // 一旦点击发送，就为按钮的class名添加disable标注
        $("#sendCode").attr("class", "disable");
        if (num == 0) {
            // 倒计时结束，恢复计时器值，移除disable标注
            $("#sendCode").text("发送验证码")
            num = 10;
            $("#sendCode").attr("class", "");
        } else {
            // 倒计时进行中，迭代调用本方法，动态更改
            var str = num + "秒后再次发送";
            $("#sendCode").text(str);
            setTimeout("timeoutChangeStyle()", 1000);
        }
        num--;
    }


</script>
<!--
<script type="text/javascript" src="/js/updatePetName.js"></script>
-->
<script type="text/javascript">
    (function () {
        var ja = document.createElement('script');
        ja.type = 'text/javascript';
        ja.async = true;
        ja.src = ('https:' == document.location.protocol ? 'https://wlssl' : 'http://wl') + '.jd.com/wl.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ja, s);
    })();
</script>
</body>
</html>
